import request from '@/utils/request'
// 列表
export function GetListAPI(params) {
  return request({
    url: '/storage/warehouse/list',
    method: 'GET',
    params
  })
}

// 新增仓库
export function AddDataAPI(data) {
  return request({
    url: '/storage/warehouse/add',
    method: 'POST',
    data
  })
}

//新增子区域
export function AddSubareaAPI(data) {
  return request({
    url: '/storage/warehouse/addSubarea',
    method: 'POST',
    data
  })
}

// 修改
export function EditDataAPI(data) {
  return request({
    url: '/storage/warehouse/update',
    method: 'POST',
    data
  })
}

// 删除
export function DelDataAPI(data) {
  return request({
    url: '/storage/warehouse/delete/' + data,
    method: 'DELETE'
  })
}

// 查看详情
export function GetDetailAPI(data) {
  return request({
    url: '/storage/warehouse/view/' + data,
    method: 'GET'
  })
}

//通过物料编码查询出关联库位
export function getKwCodeByMaterialCodeAPI(params) {
  return request({
    url: '/storage/warehouse/getKwCodeByMaterialCode',
    method: 'GET',
    params
  })
}
